package com.zjs.types;

import lombok.extern.slf4j.Slf4j;

/**
 * 字符串String的用法
 *
 * @author zhu_jinsheng
 * @version 1.0
 * @date 2020/7/15 10:06
 */
@Slf4j
public class StringUsage {
    public static void main(String[] args) {
        log.info("--------------字符串用法--------------");
        //线程安全
        String str = "String";
        //线程安全
        StringBuffer stringBuffer = new StringBuffer("StringBuffer");
        //非线程安全
        StringBuilder stringBuilder = new StringBuilder("StringBuilder");
        //效率：StringBuilder > StringBuffer > String

    }
}
